package com.yuxi.Dao.Impl;

import java.io.Serializable;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.yuxi.Dao.PowerUserDao;
import com.yuxi.Entity.PowerUser;
import com.yuxi.Entity.UserInfo;
import com.yuxi.Request.Page;

@Repository
public class PowerUserDaoImpl extends BaseDaoImpl<Serializable, Serializable> implements PowerUserDao {
	private Logger logger=LoggerFactory.getLogger(PowerUserDaoImpl.class);
	public PowerUserDaoImpl(){
		super(PowerUser.class);
	}
	@Override
	public PowerUser getPowerUser(Integer PowerUserID) {
		// TODO Auto-generated method stub
		return (PowerUser) super.get(PowerUserID);
	}

	@Override
	public int addPowerUser(PowerUser pUser) {
		// TODO Auto-generated method stub
		return  (int) super.add(pUser);
	}

	@Override
	public void deletePowerUser(PowerUser pUser) {
		// TODO Auto-generated method stub
		super.delete(pUser);
	}

	@Override
	public void modifly(PowerUser pUser) {
		// TODO Auto-generated method stub
		super.update(pUser);
	}
	@Override
	public Page<PowerUser> getPowerUserAll(Page p) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public PowerUser getPowerUserByUserId(int userId) {
		PowerUser u= (PowerUser) super.find("from PowerUser where userId=?", userId).get(0);
		return u;
	}
	

}
